#!/usr/bin/env bash
set -e
echo "Testing Installability of Phpactor Extensions"
echo "============================================="
echo ""

LIST=$(tr '\n' ' ' < "config/travis/extensions-to-test")
echo "Extensions:"
echo ""
sed 's/^/  /' < config/travis/extensions-to-test
echo ""
echo "Instatlling:"
mkdir extensions
echo '{"minimum-stability": "dev", "prefer-stable": true}' > extensions/extensions.json
echo ""
php -d memory_limit=-1 ./bin/phpactor extension:install $LIST
echo ""
echo "Done"
./bin/phpactor extension:list
